﻿using STF.Blog.Common;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace STF.Blog.WebApp.Areas.ForumManage.Models.Admins
{
    public class AdminAddViewModel
    {
        [Required(ErrorMessage ="{0}不能为空")]
        [Display(Name ="账号")]
        public string Account { get; set; }

        [Required(ErrorMessage = "{0}不能为空")]
        [DataType(DataType.Password)]
        [Display(Name = "密码")]
        public string Pwd { get; set; }

        [Required(ErrorMessage = "{0}不能为空")]
        [Display(Name = "姓名")]
        public string NickName { get; set; }

        [Required(ErrorMessage = "{0}不能为空")]
        [Column(TypeName = "date")]
        [Display(Name = "出生日期")]
        public string Birthday { get; set; }

        [Required(ErrorMessage = "{0}不能为空")]
        [Display(Name = "性别")]
        public Gender Gender { get; set; }

        [Display(Name = "头像")]
        public IFormFile Photo { get; set; }

        [Required(ErrorMessage = "{0}不能为空")]
        [Display(Name = "联系电话")]
        public string Tel { get; set; }

        [Required(ErrorMessage = "{0}不能为空")]
        [EmailAddress(ErrorMessage = "{0}格式不正确")]
        [Display(Name = "邮件地址")]
        public string Email { get; set; }

        [Required(ErrorMessage = "{0}不能为空")]
        [Display(Name = "QQ号码")]
        public string QQNumber { get; set; }

        [Required(ErrorMessage = "{0}不能为空")]
        [Display(Name = "家庭住址")]
        public string Address { get; set; }

        [Required(ErrorMessage = "{0}不能为空")]
        [Display(Name = "权限信息")]
        public int RolesId { get; set; }
    }
}
